/**
 * Created by qipia on 2017/1/17.
 */
(function () {
    /***遮罩层****/
    var bianhong = $(".bianhong"),
        shanchu2 = $("#shanchu2"),
        chacha = $("#chacha"),
        o5_ok = $("#o5_ok"),
        xieyi = $(".xieyi"),
        o5_dele = $("#o5_dele"),
        xieyichacha = $("#xieyichacha"), //协议叉叉
        xieyi = $("#xieyi"), //协议按钮
        o5_no = $("#o5_no"),
        tixian_mask = $(".tixian_mask"), //协议遮罩层
        querenshanchu = $("#querenshanchu"),
        shanchu1 = $("#shanchu1"),
        shanchuchenggong = $("#shanchuchenggong");
    bianhong.on("click", function() {
        shanchu2.css("display", "block");
        shanchuchenggong.text(bianhong.text());
    })
    chacha.on("click", function() {
        shanchu2.css("display", "none");
    })

    /***不二定制开店协议****/
    var checkbox = $("input[type='checkbox']");
    /*****判断当所有空间为只读的时候，不能点击******/

    xieyi.on("click", function() {
        tixian_mask.css("display", "block");
        xieyichacha.on("click", function() {
            tixian_mask.css("display", "none");
        })
        xieyi.on("click", function() {
            tixian_mask.css("display", "none");
            checkbox.prop("checked", "checked");
        })
    })

})();